/**
 * Created by Dalyn on 2017/3/31.
 */
import Relay from "react-relay";

export default class getSuggestListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getSuggestList }`;
    }

    getVariables() {
        return {
            argsInput: {
              pageSize: this.props.pageSize,
              pageNum: this.props.pageNum,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getSuggestListPayload {
            getSuggestList {
                value
                id
                errorCode
                totalResult
                suggestList{
                  updateDate
                  ifReply
                  url3
                  phone
                  ifShow
                  detail
                  headUrl
                  sid
                  createDate
                  userName
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on getSuggestListPayload {
                    getSuggestList {
                      value
                      id
                      errorCode
                      totalResult
                      suggestList{
                        updateDate
                        ifReply
                        url3
                        phone
                        ifShow
                        detail
                        headUrl
                        sid
                        createDate
                        userName
                      }
                  }
                }
            `]
        }];
    }

}
